Page({

  /**
   * 页面的初始数据
   */
  data: {
    indicatorDots: true,
    autoplay: false,
    interval: 2000,
    duration: 1000,
    array:
    [
      {
        "id": 1,
        "imageUrl": "http://img5.imgtn.bdimg.com/it/u=1555154248,780810037&fm=27&gp=0.jpg",
        "imageTitle": "家人闲坐，灯火可亲。",
        "imageText": "家人闲坐，灯火可亲",
        "imageDataMonth": "一月",
        "imageDataDay": "14",
        "imageDay": "星期日",
        "textAuthor": "汪曾祺《冬天》（推荐by果儿）",
        "imageEvent":[{
          "title":"抱团取暖",
          "content":"岛国纪录片《猫咪物语》里，有一段讲述了猫咪如何在零下的雪地里生存，真的太机智了！",
          "vedioUrl":"http://img5.imgtn.bdimg.com/it/u=1555154248,780810037&fm=27&gp=0.jpg",
          "catsIcon":"./images/cat_icon.png"
        },{
            "title": "超可爱香蕉造型猫窝",
            "content": "超可爱香蕉造型猫窝，秋冬特别加绒设计，三种尺寸可选。",
            "imageUrl": "http://img5.imgtn.bdimg.com/it/u=1555154248,780810037&fm=27&gp=0.jpg",
            "catsIcon": "./images/cat_icon.png"
        },{
            "content": "奶牛猫：妈，你不管管吗？这只傻猪压到我了！",
            "gifUrl": "http://img5.imgtn.bdimg.com/it/u=1555154248,780810037&fm=27&gp=0.jpg",
            "catsIcon": "./images/cat_icon.png"
        }]
      },
      {
        "id": 2,
        "imageUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg",
        "imageTitle": "一堆小奶猫来袭，心脏已无法承受。",
        "imageText": "生命差点儿不能成其为生命，我们差点儿做不成我们自己。",
        "imageDataMonth": "一月",
        "imageDataDay": "13",
        "imageDay": "星期六",
        "textAuthor": "卡尔维诺",
        "imageEvent": [{
          "title": "抱团取暖",
          "content": "岛国纪录片《猫咪物语》里，有一段讲述了猫咪如何在零下的雪地里生存，真的太机智了！",
          "vedioUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg"
        }, {
          "title": "超可爱香蕉造型猫窝",
          "content": "超可爱香蕉造型猫窝，秋冬特别加绒设计，三种尺寸可选。",
          "imageUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg"
        }, {
          "content": "奶牛猫：妈，你不管管吗？这只傻猪压到我了！",
          "gifUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg"
        }]
      },
      {
        "id": 3,
        "imageUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg",
        "imageTitle": "不是渐行渐远，而是有一天终要重逢。",
        "imageText": "不是渐行渐远，而是有一天终要重逢。",
        "imageDataMonth": "一月",
        "imageDataDay": "12",
        "imageDay": "星期五",
        "textAuthor": "龙应台——《目送》",
        "imageEvent": [{
          "title": "抱团取暖",
          "content": "岛国纪录片《猫咪物语》里，有一段讲述了猫咪如何在零下的雪地里生存，真的太机智了！",
          "vedioUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg"
        }, {
          "title": "超可爱香蕉造型猫窝",
          "content": "超可爱香蕉造型猫窝，秋冬特别加绒设计，三种尺寸可选。",
          "imageUrl": "http://a3.topitme.com/9/fd/82/1119576194eff82fd9o.jpg"
        }, {
          "content": "奶牛猫：妈，你不管管吗？这只傻猪压到我了！",
          "gifUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg"
        }]
      },
      {
        "id": 4,
        "imageUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg",
        "imageTitle": "女人啊，再怎么打拼，要是没有一只猫，人生是不完整的呀！",
        "imageText": "对于未来，你的任务不是去预知它，而是去启动它。",
        "imageDataMonth": "一月",
        "imageDataDay": "11",
        "imageDay": "星期四",
        "textAuthor": "《小王子》",
        "imageEvent": [{
          "title": "抱团取暖",
          "content": "岛国纪录片《猫咪物语》里，有一段讲述了猫咪如何在零下的雪地里生存，真的太机智了！",
          "vedioUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg"
        }, {
          "title": "超可爱香蕉造型猫窝",
          "content": "超可爱香蕉造型猫窝，秋冬特别加绒设计，三种尺寸可选。",
          "imageUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg"
        }, {
          "content": "奶牛猫：妈，你不管管吗？这只傻猪压到我了！",
          "gifUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg"
        }]
      },
      {
        "id": 5,
        "imageUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg",
        "imageTitle": "众生皆苦，你是草莓味。",
        "imageText": "众生皆苦，你是草莓味。",
        "imageDataMonth": "一月",
        "imageDataDay": "10",
        "imageDay": "星期四",
        "textAuthor": "推荐by岳岳酥",
        "imageEvent": [{
          "title": "抱团取暖",
          "content": "岛国纪录片《猫咪物语》里，有一段讲述了猫咪如何在零下的雪地里生存，真的太机智了！",
          "vedioUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg"
        }, {
          "title": "超可爱香蕉造型猫窝",
          "content": "超可爱香蕉造型猫窝，秋冬特别加绒设计，三种尺寸可选。",
          "imageUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg"
        }, {
          "content": "奶牛猫：妈，你不管管吗？这只傻猪压到我了！",
          "gifUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg"
        }]
      },
      {
        "id": 6,
        "imageUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg",
        "imageTitle": "一堆小奶猫来袭，心脏已无法承受。",
        "imageText": "生命差点儿不能成其为生命，我们差点儿做不成我们自己。",
        "imageDataMonth": "一月",
        "imageDataDay": "9",
        "imageDay": "星期三",
        "textAuthor": "卡尔维诺",
        "imageEvent": [{
          "title": "抱团取暖",
          "content": "岛国纪录片《猫咪物语》里，有一段讲述了猫咪如何在零下的雪地里生存，真的太机智了！",
          "vedioUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg"
        }, {
          "title": "超可爱香蕉造型猫窝",
          "content": "超可爱香蕉造型猫窝，秋冬特别加绒设计，三种尺寸可选。",
          "imageUrl": "./images/thumb_2.jpg"
        }, {
          "content": "奶牛猫：妈，你不管管吗？这只傻猪压到我了！",
          "gifUrl": "./images/thumb_2.jpg"
        }]
      },
      {
        "id": 7,
        "imageUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg",
        "imageTitle": "不是渐行渐远，而是有一天终要重逢。",
        "imageText": "家人闲坐，灯火可亲",
        "imageDataMonth": "一月",
        "imageDataDay": "8",
        "imageDay": "星期二",
        "textAuthor": "汪曾祺《冬天》（推荐by果儿）",
        "imageEvent": [{
          "title": "抱团取暖",
          "content": "岛国纪录片《猫咪物语》里，有一段讲述了猫咪如何在零下的雪地里生存，真的太机智了！",
          "vedioUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg"
        }, {
          "title": "超可爱香蕉造型猫窝",
          "content": "超可爱香蕉造型猫窝，秋冬特别加绒设计，三种尺寸可选。",
          "imageUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg"
        }, {
          "content": "奶牛猫：妈，你不管管吗？这只傻猪压到我了！",
          "gifUrl": "http://pic8.photophoto.cn/20080813/0035036019860667_b.jpg"
        }]
      },

    ]
    
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    console.log(options.id)//获取参数
    var id=options.id;
    this.setData({
      id:id
    })
    console.log(this.data.array)
    var arrayList;
    for(var i=0;i<this.data.array.length;i++){
      if(this.data.array[i].id==this.data.id){
        arrayList=this.data.array[i];
      }
    }
   this.setData({
     arrayList:arrayList
   })


  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
    
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
    
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
    
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
    
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
    
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
    
  }
})